<%@ page language="java" import="java.util.*,util.*,com.oreilly.servlet.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%
//设定当前文件上传的目标文件夹
String savePath=request.getRealPath("/upload");
//设定文件上传的最大容量
int maxSize=10*10*1024*1024;
//创建文件上传请求域对象
MultipartRequest req=new MultipartRequest(request,savePath,maxSize,"utf-8",new RenamePolicyCos());
String files=FileUp.uploadfiles(req);
out.print(files.replace("/",""));//处理完写到页面的信息，只需要文件名不是路径所以去掉/
%>